import { connect } from 'react-redux'
// import { i}
import * as Action  from '../modules/questions'

import Manager from '../components/QuestionsManager'

const mapDispatchToProps={
		getQuestionsByTermsId:Action.getQuestionsByTermsId,
		addOneQuestion:Action.addOneQuestion,
		updateOneQuestionById:Action.updateOneQuestionById,
		deleteOneQuestionById:Action.deleteOneQuestionById,
}

const mapStateToProps=(state)=>{

	 return Object.assign({},state,{terms:{...state.terms,questionsList:[]}})
}

export default connect(mapStateToProps,mapDispatchToProps)(Manager)